package com.taa.controller;

import com.taa.entity.Cart;
import com.taa.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: taa
 * @Desc: 购物车功能
 * @Create: 2025-06-14 15:31
 **/
@RestController
@RequestMapping("/provider")
public class CartController {
    
    @GetMapping("/cart/{userId}")
    public Cart getCart(@PathVariable("userId") Long userId) {
        List<String> goods = List.of("iPhone 15", "MacBook Pro", "AirPods");
        return new Cart(1L, userId, goods);
    }
}

